#pragma once

#ifdef GK_DEVICE_DIRECTX10

#include "../GkDevice.Common.h"

namespace gk
{
	class DeviceDirectX10 : public DeviceCommon
	{
		void 				Initialise(InitParamsHandle hInitParams);
		void 				Shutdown();
		bool 				Present();

		// Object creation
		void				CreateContext(ContextHandle hContext);
		void				CreateBuffer(BufferHandle hBuffer);
		void				CreateRenderTarget(RenderTargetHandle hRenderTarget);
		void				CreateRenderSurface(RenderSurfaceHandle hRenderSurface);
		void				CreateTexture(TextureHandle hTexture);
		void				CreateStreamDescription(StreamDescriptionHandle hStreamDescription);
		void				CreateRenderBinding(RenderBindingHandle hRenderBinding);
		void				CreateGpuProgram(GpuProgramHandle hGpuProgram);
		void				CreateStateBlock(StateBlockHandle hStateBlock);
		void				CreateConstantBuffer(ConstantBufferHandle hConstantBuffer);

		// Object destruction
		void				ReleaseContext(ContextHandle hContext);
		void				ReleaseBuffer(BufferHandle hBuffer);
		void				ReleaseRenderTarget(RenderTargetHandle hRenderTarget);
		void				ReleaseRenderSurface(RenderSurfaceHandle hRenderSurface);
		void				ReleaseTexture(TextureHandle hTexture);
		void				ReleaseStreamDescription(StreamDescriptionHandle hStreamDescription);
		void				ReleaseRenderBinding(RenderBindingHandle hRenderBinding);
		void				ReleaseGpuProgram(GpuProgramHandle hGpuProgram);
		void				ReleaseStateBlock(StateBlockHandle hStateBlock);
		void				ReleaseConstantBuffer(ConstantBufferHandle hConstantBuffer);

	private:

		IDXGISwapChain*			m_pSwapChain;
		ID3D10Device*			m_pDevice;
		ID3D10RenderTargetView*	m_pRenderTargetView;
	};
}

#endif // GK_DEVICE_DIRECTX10